/**
 * \file MonkeyFrameListener.h
 * \author Niels van Galen Last & Erik Kok
 * \date 01-15-08
 */
#ifndef MONKEY_FRAME_LISTENER_H
#define MONKEY_FRAME_LISTENER_H

#include "ExampleApplication.h"
#include "Character.h"
#include "OgreCharacter.h"
#include "ExtendedCamera.h"

#include "EnemyManager.h"
#include "InfoManager.h"

class MonkeyFrameListener : public ExampleFrameListener
{
public:
	/// Default constructor
	MonkeyFrameListener(RenderWindow* win, Camera* cam, SceneNode* sn);

	/**
	 * Sets the main character
		\param character The Character you want to use
	 */
	void setCharacter (Character *character) { mChar = character; }

	/**
	 * Sets the camera
		\param cam The camera you want to use
	 */
	void setExtendedCamera (ExtendedCamera *cam) { mExCamera = cam; }

	/**
	 * Sets the enemy manager
		\param EmenyManger The Enemymanager you want to use
	 */
	void set_enemy_manager( EnemyManager* enemy_manager) { this->enemy_manager = enemy_manager; }

	/**
	 * Sets the info manager
		\param InfoManger The InfoManager you want to use
	 */
	void set_info_manager( InfoManager* info_manager);
	
	/// This function runs every time after a frame starts
	bool frameStarted(const FrameEvent& evt);

protected:
	// References to the main character and the camera
	Character *mChar;
	ExtendedCamera *mExCamera;
	SceneManager* scene_manager;
	

	// Camera mode - Now supports 1st person, 3rd person (chasing) and 3rd person (fixed)
	unsigned int mMode;

	SceneNode* mNode;

private:
	EnemyManager* enemy_manager;
	InfoManager* info_manager;
	RenderWindow* win;
	bool runner;
};

#endif
